package com.wwwarehouse.carddesk.bean.teambean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @创建者 chenchao.
 * @创建时间 2017/11/21 11:49
 * @描述 ${TODO}
 */

public class RecyclePowerBean implements Parcelable {

    /**
     * nameDesc : [""]
     * details : [{"cardName":"","faileReason":"未知原因","userName":"王海海"}]
     * user : 王海海
     * status : 1
     */

    private String user;
    private String            status;
    private List<String>      nameDesc;
    private List<DetailsBean> details;

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<String> getNameDesc() {
        return nameDesc;
    }

    public void setNameDesc(List<String> nameDesc) {
        this.nameDesc = nameDesc;
    }

    public List<DetailsBean> getDetails() {
        return details;
    }

    public void setDetails(List<DetailsBean> details) {
        this.details = details;
    }

    public static class DetailsBean implements Parcelable {
        /**
         * cardName :
         * faileReason : 未知原因
         * userName : 王海海
         */

        private String cardName;
        private String faileReason;
        private String userName;

        public String getCardName() {
            return cardName;
        }

        public void setCardName(String cardName) {
            this.cardName = cardName;
        }

        public String getFaileReason() {
            return faileReason;
        }

        public void setFaileReason(String faileReason) {
            this.faileReason = faileReason;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.cardName);
            dest.writeString(this.faileReason);
            dest.writeString(this.userName);
        }

        public DetailsBean() {
        }

        protected DetailsBean(Parcel in) {
            this.cardName = in.readString();
            this.faileReason = in.readString();
            this.userName = in.readString();
        }

        public static final Creator<DetailsBean> CREATOR = new Creator<DetailsBean>() {
            @Override
            public DetailsBean createFromParcel(Parcel source) {
                return new DetailsBean(source);
            }

            @Override
            public DetailsBean[] newArray(int size) {
                return new DetailsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.user);
        dest.writeString(this.status);
        dest.writeStringList(this.nameDesc);
        dest.writeList(this.details);
    }

    public RecyclePowerBean() {
    }

    protected RecyclePowerBean(Parcel in) {
        this.user = in.readString();
        this.status = in.readString();
        this.nameDesc = in.createStringArrayList();
        this.details = new ArrayList<DetailsBean>();
        in.readList(this.details, DetailsBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<RecyclePowerBean> CREATOR = new Parcelable.Creator<RecyclePowerBean>() {
        @Override
        public RecyclePowerBean createFromParcel(Parcel source) {
            return new RecyclePowerBean(source);
        }

        @Override
        public RecyclePowerBean[] newArray(int size) {
            return new RecyclePowerBean[size];
        }
    };
}
